package visitor;

import hypeerweb.Node;

public class FindVisitor extends SendVisitor {
	public final String FINAL_NODE="final_node";

	/**
	 * Inserts the found node into the parameters so we can get it back out later
	 * 
	 * @params node
	 * 			the target node for the finding
	 * @params parameters
	 * 			the hashmap for holding the parameters
	 * 
	 * @pre parameters doesn't contain node
	 * @post parameters does contain node
	 */
	protected void targetOperation(Node node, Parameters parameters) {
		parameters.set(FINAL_NODE, node);

	}

	@Override
	protected void intermediateOperation(Node node, Parameters parameters) {
		parameters.set(FINAL_NODE, null);

	}
}
